-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/488068 auth common backend and accounts apis #37
base: main
Are you sure you want to change the base?
Feature/488068 auth common backend and accounts apis #37
Conversation
src/EprPrnIntegration.Common/Middleware/PrnServiceAuthorisationHandler.cs
Show resolved
Hide resolved
@@ -12,4 +12,5 @@ public class Service | |||
public int? Retries { get; set; } | |||
public string? PrnBaseUrl { get; set; } | |||
public string? PrnEndPointName { get; set; } | |||
public string? ClientId { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need 2 client Id's one for Prn Service and one for account service.
services.AddHttpClient(Common.Constants.HttpClientNames.Npwd) | ||
.AddHttpMessageHandler<NpwdOAuthMiddleware>(); | ||
services.AddHttpClient(Common.Constants.HttpClientNames.Npwd).AddHttpMessageHandler<NpwdOAuthMiddleware>(); | ||
services.AddHttpClient(Common.Constants.HttpClientNames.Prn).AddHttpMessageHandler<PrnServiceAuthorisationHandler>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have named this client but where this has been used?
{ | ||
if (!string.IsNullOrEmpty(config.Value.ClientId)) | ||
{ | ||
_tokenRequestContext = new TokenRequestContext([config.Value.ClientId]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have single handler for two service we need to get token for both services. We discussed this yesterday
handler for calling Common backend and Accounts APIs